<template>
  <t-virtual-scroll
    style="max-height: 300px"
    :items="heavyList"
    separator
    v-slot="{ item, index }"
  >
    <t-item :key="index" dense>
      <t-item-section>
        <t-item-label> #{{ index }} - {{ item.label }} </t-item-label>
      </t-item-section>
    </t-item>
  </t-virtual-scroll>
</template>

<script>
  const maxSize = 10000;
  const heavyList = [];

  for (let i = 0; i < maxSize; i++) {
    heavyList.push({
      label: 'Option ' + (i + 1),
    });
  }

  export default {
    setup() {
      return {
        heavyList,
      };
    },
  };
</script>
